#!/user/bin/env python3
# -*- coding: utf-8 -*-
"""
--------------------------------------
    Author:     JiChao_Song
    Data  :     2020/5/9 上午11:56
--------------------------------------
"""
from BeautifulReport import ReportTestResult


class UnittestReport(ReportTestResult):

    def __init__(self, suites):
        super(UnittestReport, self).__init__(suites)
        self.suites = suites
        self.report_dir = None
        self.title = '自动化测试报告'
        self.filename = 'report.html'
        self.res = []

    def results(self):
        self.suites.run(result=self)
        print('\n')
        return self.stopTestRun(title=self.title)
